x86emul/test: introduce eq()
authorJan Beulich <jbeulich@suse.com>
Fri, 26 Oct 2018 13:21:20 +0000 (15:21 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 26 Oct 2018 13:21:20 +0000 (15:21 +0200)
commit9f36c692845267be7846632d7d5f744d6a5b7f84
tree42b31759d9d6819fdf510638468a0a67f54caebe
parent304a8301fc9c6ff1f45a6aa081c56cd57bc7696a
x86emul/test: introduce eq()

In preparation for sensible to-boolean conversion on AVX512, wrap
another abstraction function around the present to_bool(<x> == <y>), to
get rid of the open-coded == (which will get in the way of using
built-in functions instead). For the future AVX512 use scalar operands
can't be used then anymore: Use (vec_t){} when the operand is zero,
and broadcast (if available) otherwise (assume pre-AVX512 when broadcast
is not available, in which case a plain scalar is still fine).

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
tools/tests/x86_emulator/simd-fma.c
tools/tests/x86_emulator/simd.c